3.3.97 \(\int \frac {(a+b x^n)^2}{(c+d x^n)^3} \, dx\) [297]

Optimal. Leaf size=160 \[ -\frac {(b c-a d) x \left (a+b x^n\right )}{2 c d n \left (c+d x^n\right )^2}+\frac {(b c-a d) (a d (1-2 n)-b c (1+n)) x}{2 c^2 d^2 n^2 \left (c+d x^n\right )}-\frac {\left (2 a b c d (1-n)-b^2 c^2 (1+n)-a^2 d^2 \left (1-3 n+2 n^2\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{2 c^3 d^2 n^2} \]

[Out]

-1/2*(-a*d+b*c)*x*(a+b*x^n)/c/d/n/(c+d*x^n)^2+1/2*(-a*d+b*c)*(a*d*(1-2*n)-b*c*(1+n))*x/c^2/d^2/n^2/(c+d*x^n)-1
/2*(2*a*b*c*d*(1-n)-b^2*c^2*(1+n)-a^2*d^2*(2*n^2-3*n+1))*x*hypergeom([1, 1/n],[1+1/n],-d*x^n/c)/c^3/d^2/n^2

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {424, 393, 251} \begin {gather*} -\frac {x \left (-a^2 d^2 \left (2 n^2-3 n+1\right )+2 a b c d (1-n)-b^2 c^2 (n+1)\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{2 c^3 d^2 n^2}+\frac {x (b c-a d) (a d (1-2 n)-b c (n+1))}{2 c^2 d^2 n^2 \left (c+d x^n\right )}-\frac {x (b c-a d) \left (a+b x^n\right )}{2 c d n \left (c+d x^n\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)^2/(c + d*x^n)^3,x]

[Out]

-1/2*((b*c - a*d)*x*(a + b*x^n))/(c*d*n*(c + d*x^n)^2) + ((b*c - a*d)*(a*d*(1 - 2*n) - b*c*(1 + n))*x)/(2*c^2*
d^2*n^2*(c + d*x^n)) - ((2*a*b*c*d*(1 - n) - b^2*c^2*(1 + n) - a^2*d^2*(1 - 3*n + 2*n^2))*x*Hypergeometric2F1[
1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])/(2*c^3*d^2*n^2)

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 424

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(a*d - c*b)*x*(a + b*x^n)^(
p + 1)*((c + d*x^n)^(q - 1)/(a*b*n*(p + 1))), x] - Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)
^(q - 2)*Simp[c*(a*d - c*b*(n*(p + 1) + 1)) + d*(a*d*(n*(q - 1) + 1) - b*c*(n*(p + q) + 1))*x^n, x], x], x] /;
 FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, n, p, q
, x]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^3} \, dx &=-\frac {(b c-a d) x \left (a+b x^n\right )}{2 c d n \left (c+d x^n\right )^2}+\frac {\int \frac {a (b c-a d (1-2 n))-b (a d (1-n)-b c (1+n)) x^n}{\left (c+d x^n\right )^2} \, dx}{2 c d n}\\ &=-\frac {(b c-a d) x \left (a+b x^n\right )}{2 c d n \left (c+d x^n\right )^2}+\frac {(b c-a d) (a d (1-2 n)-b c (1+n)) x}{2 c^2 d^2 n^2 \left (c+d x^n\right )}-\frac {\left (2 a b c d (1-n)-b^2 c^2 (1+n)-a^2 d^2 \left (1-3 n+2 n^2\right )\right ) \int \frac {1}{c+d x^n} \, dx}{2 c^2 d^2 n^2}\\ &=-\frac {(b c-a d) x \left (a+b x^n\right )}{2 c d n \left (c+d x^n\right )^2}+\frac {(b c-a d) (a d (1-2 n)-b c (1+n)) x}{2 c^2 d^2 n^2 \left (c+d x^n\right )}-\frac {\left (2 a b c d (1-n)-b^2 c^2 (1+n)-a^2 d^2 \left (1-3 n+2 n^2\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{2 c^3 d^2 n^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 133, normalized size = 0.83 \begin {gather*} \frac {x \left (\frac {c^2 (b c-a d)^2 n}{\left (c+d x^n\right )^2}-\frac {c (b c-a d) (a d (-1+2 n)+b (c+2 c n))}{c+d x^n}+\left (2 a b c d (-1+n)+b^2 c^2 (1+n)+a^2 d^2 \left (1-3 n+2 n^2\right )\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )\right )}{2 c^3 d^2 n^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)^2/(c + d*x^n)^3,x]

[Out]

(x*((c^2*(b*c - a*d)^2*n)/(c + d*x^n)^2 - (c*(b*c - a*d)*(a*d*(-1 + 2*n) + b*(c + 2*c*n)))/(c + d*x^n) + (2*a*
b*c*d*(-1 + n) + b^2*c^2*(1 + n) + a^2*d^2*(1 - 3*n + 2*n^2))*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^
n)/c)]))/(2*c^3*d^2*n^2)

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \,x^{n}\right )^{2}}{\left (c +d \,x^{n}\right )^{3}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)^2/(c+d*x^n)^3,x)

[Out]

int((a+b*x^n)^2/(c+d*x^n)^3,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^2/(c+d*x^n)^3,x, algorithm="maxima")

[Out]

((2*n^2 - 3*n + 1)*a^2*d^2 + b^2*c^2*(n + 1) + 2*a*b*c*d*(n - 1))*integrate(1/2/(c^2*d^3*n^2*x^n + c^3*d^2*n^2
), x) - 1/2*((b^2*c^2*d*(2*n + 1) - a^2*d^3*(2*n - 1) - 2*a*b*c*d^2)*x*x^n - (a^2*c*d^2*(3*n - 1) - b^2*c^3*(n
 + 1) - 2*a*b*c^2*d*(n - 1))*x)/(c^2*d^4*n^2*x^(2*n) + 2*c^3*d^3*n^2*x^n + c^4*d^2*n^2)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^2/(c+d*x^n)^3,x, algorithm="fricas")

[Out]

integral((b^2*x^(2*n) + 2*a*b*x^n + a^2)/(d^3*x^(3*n) + 3*c*d^2*x^(2*n) + 3*c^2*d*x^n + c^3), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)**2/(c+d*x**n)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^2/(c+d*x^n)^3,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^2/(d*x^n + c)^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,x^n\right )}^2}{{\left (c+d\,x^n\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)^2/(c + d*x^n)^3,x)

[Out]

int((a + b*x^n)^2/(c + d*x^n)^3, x)

________________________________________________________________________________________